
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="author" content="www.rsnet.com.cn" />

<meta name="format-detection" content="telephone=no" />
<meta name="format-detection" content="email=no" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="x5-orientation" content="portrait">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>

<head>
<title>测试正则匹配</title>
<script type="text/javascript" src="libs/Achilles.js"></script>
<script type="text/javascript">
function cartesian(arr) {
  if (arr.length < 2) return arr[0] || [];
  return [].reduce.call(arr, function (col, set) {
    let res = [];
    col.forEach(c => {
      set.forEach(s => {
        let t = [].concat(Array.isArray(c) ? c : [c]);
        t.push(s);
        res.push(t);
      })
    });
    return res;
  });
}
var test = (function(){
  var data = [null,undefined,false,true,'false','true','',NaN,0,1,'0','1','1.1'];
  var fun = ['isStr','isNum','isTF','isInt'];
  var type = [1];
  return cartesian([data,fun,type])
})()
</script>
</head>
<style type="text/css">
.true{color:green;}
.false{color:red;}
</style>
<body>
  <table><tbody>
<script type="text/javascript">
var a = Achilles//.setValue('a')
// console.log(a)
// console.log(Achilles)

var html = '';
for(var i in test){
  var t0 = test[i][0];
  var t1 = test[i][1];
  var r = eval('a.setValue('+t0+').'+t1+'()')
  html += `<tr><td>a.setValue(${t0}).${t1}()</td><td><span class="${r}">${r}</span></td></tr>`
}
document.write(html)
</script>
</tbody></table>

</body>
</html>
